fix(web): repair Redis promise typecheck regression - #1658
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
There was a problem hiding this comment.
🟢 Approved
The reviewed fix resolves the build regression with no unresolved issues.
Pull request overview
Fixes the Redis promise type-check regression that blocked production web builds.
Changes:
- Removes the self-referential promise initializer.
- Preserves memoization, concurrent promise sharing, and retry behavior after failure.
File summaries
| File | Description |
|---|---|
apps/web/src/lib/video-pack-store.ts |
Corrects Redis promise initialization and failure cleanup. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
Repairs the production web-build regression introduced when the atomic Video Pack Redis claim implementation merged in #1639.
The Redis initializer declared
promiseand captured it inside its own async initializer. TypeScript reportsTS2454: Variable 'promise' is used before being assigned, causingnext buildto fail on current main and on unrelated Python PRs.This change removes the self-reference. A failed import clears the only memoized Redis promise directly; concurrent callers still share that promise.
Evidence
video-pack-store.ts:132Safety boundary
Draft only. No Redis call, deployment, merge, production mutation, or data mutation is included.